
const Fly=require("flyio/dist/npm/wx") 
const flyhttp = new Fly() 


flyhttp.interceptors.request.use((request) => {
    wx.showLoading({ title: '拼命加载中...' })
    return request
})
flyhttp.interceptors.response.use((response) => { 
    wx.hideLoading();
    if(response.data.code!=200){ 
        wx.showToast({
            title: response.data.msg,
            icon: 'none'
        })
    } 
    return response
})

export default flyhttp